<!-- eslint-disable vue/multi-word-component-names -->
<template>
    <template v-for="(item, index) in routes" :key="index">
        <template v-if="!item.meta?.hide">
            <template v-if="!item.children || item.children === 0">
                <el-menu-item :index="item.path">
                    <el-icon>
                        <component :is="item.meta?.icon" />
                    </el-icon>
                    <span>{{ item.meta?.title }}</span>
                </el-menu-item>
            </template>

            <el-sub-menu :index="item.path" v-else>
                <template #title>
                    <el-icon>
                        <component :is="item.meta?.icon" />
                    </el-icon>
                    <span>{{ item.meta?.title }}</span>
                </template>
                <Menu :routes="item.children" />
            </el-sub-menu>

        </template>
    </template>
</template>
<script setup lang="ts">
const { routes } = defineProps(["routes"])



</script>
<style lang="scss" scoped></style>